package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RcImportancia generated by hbm2java
 */
@Entity
@Table(name = "RC_IMPORTANCIA", schema = "RUC")
public class RcImportancia implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2270986767703617150L;
	private RcImportanciaId id;
	private RcRuc rcRuc;
	private TbImportancia tbImportancia;
	private String cusuario;
	private Date ffimportancia;
	private Date fhingreso;
	private String nfolio;

	public RcImportancia() {
	}

	public RcImportancia(RcImportanciaId id, RcRuc rcRuc,
			TbImportancia tbImportancia, String cusuario, Date fhingreso) {
		this.id = id;
		this.rcRuc = rcRuc;
		this.tbImportancia = tbImportancia;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	public RcImportancia(RcImportanciaId id, RcRuc rcRuc,
			TbImportancia tbImportancia, String cusuario, Date ffimportancia,
			Date fhingreso, String nfolio) {
		this.id = id;
		this.rcRuc = rcRuc;
		this.tbImportancia = tbImportancia;
		this.cusuario = cusuario;
		this.ffimportancia = ffimportancia;
		this.fhingreso = fhingreso;
		this.nfolio = nfolio;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nit", column = @Column(name = "NIT", nullable = false, length = 14)),
			@AttributeOverride(name = "cimportancia", column = @Column(name = "C_IMPORTANCIA", nullable = false, length = 1)),
			@AttributeOverride(name = "fiimportancia", column = @Column(name = "FI_IMPORTANCIA", nullable = false, length = 7)) })
	public RcImportanciaId getId() {
		return this.id;
	}

	public void setId(RcImportanciaId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", nullable = false, insertable = false, updatable = false)
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_IMPORTANCIA", nullable = false, insertable = false, updatable = false)
	public TbImportancia getTbImportancia() {
		return this.tbImportancia;
	}

	public void setTbImportancia(TbImportancia tbImportancia) {
		this.tbImportancia = tbImportancia;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_IMPORTANCIA", length = 7)
	public Date getFfimportancia() {
		return this.ffimportancia;
	}

	public void setFfimportancia(Date ffimportancia) {
		this.ffimportancia = ffimportancia;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "N_FOLIO", length = 12)
	public String getNfolio() {
		return this.nfolio;
	}

	public void setNfolio(String nfolio) {
		this.nfolio = nfolio;
	}

}
